package org.x.yuenovel.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author xuezhendong
 * @date 2022/4/20 10:14 下午
 */
@Getter
@AllArgsConstructor
public enum ResultCodeEnum {

    /**
     *
     */
    ERROR("500", "服务端异常"),
    SUCCESS("200", "操作成功"),
    FORBIDDEN("403", "没有相关权限"),
    NO_LOGIN("10001", "没有登录"),
    CAPTCHA_ERROR("10002", "验证码错误"),
    CAPTCHA_EP("10003", "验证码过期，请重新获取"),
    PARAM_ERROR("10004", "参数检验失败"),
    UNAUTHORIZED("10005", "暂未登录或token已经过期"),
    USERNAME_REQUIRED("10006", "USERNAME REQUIRED"),
    PASSWORD_REQUIRED("10007", "PASSWORD REQUIRED"),
    STATUS_LOCKED("10008", "STATUS LOCKED"),
    EMAIL_CAPTCHA_SENDED("10009", "邮箱验证码已发送！"),
    EMAIL_CAPTCHA_ERROR("10010", "邮箱验证码错误！"),
    EMAIL_CAPTCHA_EP("10011", "邮箱验证码过期！"),
    USERNAME_LEN_ERROR("10012", "用户名长度必须为2-10个非空白字符！"),
    PASSWORD_LEN_ERROR("10012", "密码长度必须为6-20个非空白字符！"),
    ROLE_ERROR("10013", "用户角色不合法！"),
    EMAIL_HAD("10014", "邮箱已注册！"),
    USER_NAME_HAD("10015", "用户名已注册！"),
    ;

    private final String code;
    private final String msg;
}
